<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

<script type="text/javascript">
$(document).ready(function(){
	var uri = "<%= request.getRequestURI()  %>";
	
	if (!checkUri(uri)) {
		uri = "<s:property value="#request.navUri" />";
		checkUri(uri);
	}
	
});

function checkUri(uri) {
	var menuLinks = $(".page-sidebar-menu a");
	
	for (var i=0; i<menuLinks.length; i++) {
		var link = $(menuLinks[i]);
		if (link.attr("href") != uri) {
			continue;
		}
		selectMenu(link);
		return true;
	}
	
	return false;
}

function selectMenu(link) {
	var parents = link.parents("li");
	
	for (var i=0; i<parents.length; i++) {
		var li = $(parents[i]);
		li.addClass("active");
	}
}
</script>


<ul class="page-sidebar-menu">
            
            <li>
               <!-- BEGIN SIDEBAR TOGGLER BUTTON -->
               <div class="sidebar-toggler"></div>
               <div class="clearfix"></div>
               <!-- BEGIN SIDEBAR TOGGLER BUTTON -->
            </li>
            <li class="start ">
               <a href="<s:url action="index" namespace="/admin" />">
               <i class="icon-home"></i> 
               <span class="title">首页</span>
               <span class="selected"></span>
               </a>
            </li>
            <li class="start ">
               <a href="<s:url action="list" namespace="/admin/pickup" />">
               <i class="icon-bookmark-empty"></i> 
               <span class="title">上门信息</span>
               <span class="selected"></span>
               </a>
            </li>
            <li class="start ">
               <a href="<s:url action="list" namespace="/admin/order" />">
               <i class="icon-bookmark-empty"></i> 
               <span class="title">取件通知</span>
               <span class="selected"></span>
               </a>
            </li>
            <li class="start ">
               <a href="<s:url action="list" namespace="/admin/express" />">
               <i class="icon-bookmark-empty"></i> 
               <span class="title">送货上门</span>
               <span class="selected"></span>
               </a>
            </li>
            <li class="start ">
               <a href="<s:url action="list" namespace="/admin/shop" />">
               <i class="icon-bookmark-empty"></i> 
               <span class="title">会员商铺</span>
               <span class="selected"></span>
               </a>
            </li>
            <li class="start ">
               <a href="<s:url action="list" namespace="/admin/template" />">
               <i class="icon-bookmark-empty"></i> 
               <span class="title">短信模板</span>
               <span class="selected"></span>
               </a>
            </li>
            <li class="start ">
               <a href="<s:url action="list" namespace="/admin/time" />">
               <i class="icon-bookmark-empty"></i> 
               <span class="title">时间模板</span>
               <span class="selected"></span>
               </a>
            </li>
         </ul>
         
